import request from "../utils/request";
//添加商品分类
export const api_addCate = (data) => {
  return request.post("/goods/addcate", data);
};
//修改商品分类
export const api_editCate = (data) => {
  return request.post("/goods/editcate", data);
};
//查询商品分类列表
export const api_catelist = (data) => {
  return request.get("/goods/catelist", data);
};
//删除
export const api_catedel = (id) => {
  return request.get("/goods/delcate", id);
};

//添加商品
export const api_addgoods = (data) => {
  return request.post("/goods/add", data);
};
//图片上传
export const api_upload = (file) => {
  return request.upload("/goods/goods_img_upload", file);
};
//查询所有商品分类名称
export const api_categories = () => {
  return request.get("/goods/categories");
};

//商品列表
export const api_goodslist = (data) => {
  return request.get("/goods/list", data);
};
//删除商品
export const api_goodsdel = (id) => {
  return request.get("/goods/del", id);
};
